1. Field of the Invention
The present invention relates to the decoding of compression algorithms for digital data, and particularly to decoding algorithms employing the Inverse Discrete Cosine Transform.
2. Description of the Related Art
Digital datastreams are often compressed for purposes of storage and transmission. Datastreams containing alphanumeric data are typically required to be absolutely unchanged after compression and decompression, but when working with audio or pictorial data it may be acceptable to use “lossy” compression in which some detail may be lost or altered but in which a human observer perceives the output as substantially similar to the original.
Many lossy compression algorithms have been devised, such as MP3 (Moving Picture Experts Group Layer-3 Audio) for sound recordings, JPEG (Joint Photographic Experts Group) for still pictures, and MPEG (Motion Picture Experts Group) and MPEG2 for video recordings. An embodiment of the invention to be described applies primarily to MPEG2 compression, but is applicable to other algorithms as well.
In MPEG2 compression, a video frame to be transmitted is divided into macroblocks (MB's) of 8×8 pixels. A discrete cosine transform (DCT) is run on the MB, yielding an 8×8 array of coefficients. The coefficients, quantized and perhaps further compressed by Huffman-tree encoding, are stored or transmitted for retrieval by a playback device.
The playback device performs an inverse discrete cosine transform (IDCT) on each 8×8 array of coefficients to reconstruct the equivalent to the 8×8 array of pixels from the original frame. To recover maximum detail and accuracy, all 64 of the coefficients should be processed. (Even if all 64 coefficients are used, there will still be some loss of detail because of the aforementioned quantizing.) For many applications, such as consumer entertainment, a user may be willing to sacrifice some picture quality in order to have a lower-cost playback device. In a prior-art solution, a usable or acceptable level of picture quality is attained using fewer than all 64 of the coefficients, thus permitting the use of a computational element of lesser capability. The number of coefficients used in the inverse DCT is predetermined according to a desired level of quality for a particular computational element. The picture quality can be quite good for homogeneous scenes with little camera movement and little subject movement, but degrades for highly variegated scenes or when there is rapid camera movement or rapid subject movement. Picture degradation may exceed the limits of “graceful” degradation, a term of art indicating that although degradation is permitted, it is managed so as to be as unobtrusive as possible. There is thus a need for an MPEG2 playback system with ability to process fewer than all of the DCT coefficients while maintaining graceful degradation of picture quality.